import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import "@/assets/css/element.scss" // 统一修改element样式
import "@/assets/css/selfstyle.scss" // 定义的的一些样式
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import GlobalComponents from './components/global'
import router from './router'

// 创建应用实例并链式调用 use 方法
const app = createApp(App)
  .use(ElementPlus)
  .use(router)
  .use(GlobalComponents) // 注册全局组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
// 挂载应用
app.mount('#app')